import React from 'react';
import moment from 'moment';
import styles from './index.less';

const ArticleListContent = ({ toBlogInfo, data: { objId, title, subTitle, createTime } }) => (
  <div className={styles.listContent}>
    <a className={styles.description} onClick={() => toBlogInfo(objId)}>{title}</a>
    <div className={styles.description} style={{ fontSize: '10px' }}>{subTitle}</div>
    <div className={styles.extra}>
      <em>{moment(createTime).format('YYYY-MM-DD HH:mm')}</em>
    </div>
  </div>
);

export default ArticleListContent;
